package cn.com.jinhao.provider.business.controller;

import cn.com.jinhao.hotline.commons.controller.BaseController;
import cn.com.jinhao.hotline.commons.util.RestResponse;
import cn.com.jinhao.provider.business.entity.TRKSheetRecord;
import cn.com.jinhao.provider.business.service.TRKSheetRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * hotline-spring-cloud
 * <p>Description: </p>
 *
 * @author ShaneMew
 * @version 1.0
 * @date 2020/6/11
 * @since 2020/6/11
 */
@RestController
@RequestMapping(value = "/trkSheetRecord")
@Api(tags = "录音文件服务")
public class TRKSheetRecordController extends BaseController {
    @Resource
    TRKSheetRecordService trkSheetRecordService;

    @ApiOperation(value = "根据callId查询录音文件")
    @GetMapping
    public RestResponse<TRKSheetRecord> selectByCallId(String callId) throws Exception {
        return new RestResponse<>(trkSheetRecordService.selectByCallId(callId));
    }
}
